package ch.dreamweb.readpractice.client.lesetraining.train.event;

import com.google.gwt.event.shared.GwtEvent;

public class CorrectEvent extends GwtEvent<CorrectEventHandler> {

	public static Type<CorrectEventHandler> TYPE = new Type<CorrectEventHandler>();

	private final int unit;

	public CorrectEvent(int unit) {
		this.unit = unit;
	}

	public int getUnit() {
		return unit;
	}

	@Override
	public Type<CorrectEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(CorrectEventHandler handler) {
		handler.onCorrect(this);
	}
}
